package person.zhaiming.config;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @program: zhaimingSpringCloud
 * @description:
 * @author: zhaiming
 * @create: 2020-11-30 16:06
 **/
@Configuration
public class ApplicationContextConfig {

    @Bean
    @LoadBalanced //使用LoadBalanced赋予其负载均衡能力
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
